package com.fileCenter.actions;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.actions.MappingDispatchAction;

import com.fileCenter.pojo.Model;
import com.fileCenter.web.LoginContext;
import com.fileCenter.web.LoginContextHolder;

public class BaseAction extends MappingDispatchAction {
	
	private Log log = LogFactory.getLog(this.getClass());

	public Log getLog() {
		return log;
	}
	
	public Model getLoginModel() {
		LoginContext context = LoginContextHolder.getLoginContext();
		return context == null ? null : context.getModel();
	}
}
